"""
@Project:Flask模板
@File:create_app.py
@Author:周棒
@Date:10:44
"""
from flask import Flask
from flask_cors import CORS
from model.model import db
from views.Home import home_db

def create_app(config):
    flask_app = Flask(__name__)

    flask_app.config.from_object(config)

    CORS(flask_app)

    db.init_app(flask_app)

    flask_app.register_blueprint(home_db)

    return flask_app


